package example.demo.controller;


import example.demo.aop.LogAnno;
import example.demo.component.collect.CollectTag;
//import example.demo.mideng.RaoMiDeng;
import demo.rao.mideng.annotation.RaoMiDeng;
import org.springframework.aop.framework.AopContext;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author xiao_rao
 * @since 2021-07-04
 */
//@RaoMiDeng
@RestController
@RequestMapping("/api/system/game")
public class GameController {

    // http://localhost:8080/api/system/game/dnf
    @CollectTag
    @LogAnno
    @RaoMiDeng
    @RequestMapping(path = "/dnf")
    public String dnf(@RequestParam(required = false) String demo) {
        Object o = AopContext.currentProxy();
        return Thread.currentThread().getName() + "--dnf--" + demo;
    }

    @RaoMiDeng(message = "啊哈哈哈")
    @RequestMapping(path = "/lol")
    public String lol() {
        Object o = AopContext.currentProxy();
        return Thread.currentThread().getName() + "--lol";
    }

    @RaoMiDeng(time = 20)
    @CollectTag
    @RequestMapping(path = "/huoyingol")
    public String huoyingol() {
        return Thread.currentThread().getName() + "--huoyingol";
    }

    @CollectTag
    @RequestMapping(path = "/ddd")
    public String ddd() {
        return Thread.currentThread().getName() + "--ddd";
    }

}
